import java.util.Scanner;

public class text1 {

    public static void printINT(int a){
        while(a!=0){
            System.out.println(a%10);
            a=a/10;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a= sc.nextInt();
        printINT(a);
    }
}
